<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: liudao
  Date: 2022/8/2
  Time: 19:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>英雄列表</title>
</head>
<body>
<h1>pagecontext作用域示例</h1>
<%
List<String> hero1 = (List<String>) pageContext.getAttribute("heros");
    out.println(hero1);
%>
<hr>
<h1>request作用域示例</h1>
<%
    List<String> hero2 = (List<String>) request.getAttribute("heros");
    out.println(hero2);
%>
<hr>
<h1>session作用域示例</h1>
<%
    List<String> hero3 = (List<String>) session.getAttribute("heros");
    out.println(hero3);
%>
<hr>
<h1>application作用域示例</h1>
<%
    List<String> hero4 = (List<String>) application.getAttribute("heros");
    out.println(hero4);
%>

</body>
</html>
